import Vue from 'vue'
import App from './App'
import store from './store' // store
import plugins from './plugins' // plugins
import './permission' // permission
import en from './locale/en.json'
import zhHans from './locale/zh-Hans.json'
import es from './locale/es.json'
import VueI18n from 'vue-i18n' // v8.x
import VueLuckyCanvas from '@lucky-canvas/vue'
import uView from "uview-ui";

Vue.use(uView);
Vue.use(plugins)


const messages = {
	'en': en,
	'zh-Hans': zhHans,
	'es': es,
}
console.log(uni.getLocale())
let i18nConfig = {
	locale: uni.getLocale(), // 获取已设置的语言
	messages
}


Vue.use(VueLuckyCanvas)
Vue.use(VueI18n)
const i18n = new VueI18n(i18nConfig)
Vue.config.productionTip = false
Vue.prototype.$store = store
App.mpType = 'app'

const app = new Vue({
	i18n,
	...App
})

app.$mount()